package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.common.util.KiteStringUtils;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.service.attr.data.CustAttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;

/**
 * @author wanghl386
 * @version 1.0
 * @date 2021/5/25 13:54
 */


public class SetCustNameAttrHandler extends AbstractAttrHandler<KiteInst, CustAttrData> {
    @Override
    public void after(KiteAttr attr, KiteInst inst, CustAttrData data) {
        super.after(attr, inst, data);
        String serviceOfferId = data.getServiceOfferId();
        if(KiteStringUtils.equals("1", serviceOfferId) || KiteStringUtils.equals("1012", serviceOfferId)){
            String custName = data.getCustName();
            attr.setValue(custName);
        }
    }
}

